$(document).ready(function(){
						   
	var validator = $("#frm_contact").validate({
		errorElement:'div',
		rules: {
			trade: {
				required: true
			},
			jobtype: {
				required: true
			},
			describe_job: {
				required: true,
				minlength: 30
			},
			approx_budget: {
				required: true
			},
			work_to_start: {
				required: true
			},
			fname: {
				required: true,
				character:true,
				maxlength: 20
				
			},
			lname: {
				required: true,
				character:true,
				maxlength: 20
				
			},
			emailaddress: {
				required: true,
				email: true,
				remote: SITEROOT+"/modules/register/tradesman_checkemailexits.php"
			},			
			mobno: {
				required: true
			},			
			postcode: {
				required: true
			}
	
		},
		messages: {
			trade:{
				required: "Please select trade category"
			},
			jobtype:{
				required: "Please select job type"
			},
			describe_job: {
				required: "Please enter job description",
				maxlength: "Please enter at least 30 characters."
			},
			approx_budget:{
				required: "Please select one option for approximate budget"
			},
			work_to_start:{
				required: "Please select one option for work to start"
			},
			fname: {
				required: "Please enter your first name",
				character: "Please enter characters only",
				maxlength: "Name length should be maximum 20 characters"
			},
			lname: {
				required: "Please enter your last name",
				character: "Please enter characters only",
				maxlength: "Name length should be maximum 20 characters"
			},
			emailaddress: {
				required: "Please enter email address",
				email: "Please enter valid email address",
				remote: jQuery.format("Email address already in used for tradesman user")
			},			
			mobno: {
				required: "Please enter mobile number"
			},			
			postcode: {
				required: "Please enter job postcode"
			}
		}
	});
	
	
	
});